package com.itheima.pojo;

import javax.persistence.*;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Date;

/**
 * @Description  
 * @Author  Hunter
 * @Date 2020-08-03 
 */

@Setter
@Getter
@ToString
@Entity
@Table ( name ="t_comment" )
public class Comment  implements Serializable {

	private static final long serialVersionUID =  5260241357248450966L;

	/**
	 * 唯一uid
	 */
	@Id
   	@Column(name = "uid" )
	private String uid;

	/**
	 * 用户uid
	 */
   	@Column(name = "user_uid" )
	private String userUid;

	/**
	 * 回复某条评论的uid
	 */
   	@Column(name = "to_uid" )
	private String toUid;

	/**
	 * 回复某个人的uid
	 */
   	@Column(name = "to_user_uid" )
	private String toUserUid;

	/**
	 * 评论内容
	 */
   	@Column(name = "content" )
	private String content;

	/**
	 * 博客uid
	 */
   	@Column(name = "blog_uid" )
	private String blogUid;

	/**
	 * 状态
	 */
   	@Column(name = "status" )
	private Integer status;

	/**
	 * 创建时间
	 */
   	@Column(name = "create_time" )
	private Date createTime;

	/**
	 * 更新时间
	 */
   	@Column(name = "update_time" )
	private Date updateTime;

	/**
	 * 评论来源： MESSAGE_BOARD，ABOUT，BLOG_INFO 等
	 */
   	@Column(name = "source" )
	private String source;

	/**
	 * 评论类型 1:点赞 0:评论
	 */
   	@Column(name = "TYPE" )
	private Integer type;

	/**
	 * 一级评论UID
	 */
   	@Column(name = "first_comment_uid" )
	private String firstCommentUid;

   	@Transient
	private Blog blog;

}
